using System;
using AntEater.ComponentModel;
using AntEater.ComponentModel.BuildElements;

namespace AntEater.Runtime.UI
{
    /// <summary>
    /// The taregt execution presenter interface defines an interface for
    /// the managing of presenting the target execution.
    /// </summary>
    public interface ITargetExecutionPresenter : IPresenter
    {
        /// <summary>
        /// Occurs when the selection of the presenter has changed.
        /// </summary>
        event EventHandler<EventArgs> SelectionChanged;

        /// <summary>
        /// Occurs when a file shoud be opened in a specific view.
        /// </summary>
        event EventHandler<BuildFileViewEventArgs> OpenFile;

        /// <summary>
        /// Gets or sets the options.
        /// </summary>
        /// <value>The options.</value>
        Options Options {
            get;
        }

        /// <summary>
        /// Gets or sets the project.
        /// </summary>
        /// <value>The project.</value>
        Project Project {
            get;
        }

        /// <summary>
        /// Gets the selected build file.
        /// </summary>
        /// <value>The selected build file.</value>
        BuildFile SelectedBuildFile {
            get;
        }

        /// <summary>
        /// Gets the selected target.
        /// </summary>
        /// <value>The selected target.</value>
        TargetBuildElement SelectedTarget {
            get;
        }

        /// <summary>
        /// Executes the build file.
        /// </summary>
        void ExecuteBuildFile();

        /// <summary>
        /// Adds the build file.
        /// </summary>
        void AddBuildFile();

        /// <summary>
        /// Removes the build file.
        /// </summary>
        void RemoveBuildFile();

        /// <summary>
        /// Edits the external build properties.
        /// </summary>
        void EditExternalBuildProperties();
    }
}
